//
//  AdvancedIdentify3ViewController.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/11.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "AdvancedIdentify3ViewController.h"
#import "AdvancedIdentify2View.h"
#import "AdvancedIdentify4ViewController.h"
@interface AdvancedIdentify3ViewController ()

@property(nonatomic,strong)AdvancedIdentify2View *advance2View;

@property(nonatomic,strong)UIButton *nextStypeBtn;

@end

@implementation AdvancedIdentify3ViewController

#pragma mark 初始化
-(void)loadView{
    [super loadView];
    self.advance2View = [[AdvancedIdentify2View alloc] initWithFrame:self.view.bounds];
    self.view = self.advance2View;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"高级认证";
    self.view.backgroundColor = [UIColor whiteColor];
    //下一步
    [self createNextStype];
    //修改Value
    [self changeValue];
}

-(void)changeValue
{
    self.advance2View.tipsLab.text = @"上传认证拍照";
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"3/4"];
    [attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:91.0f/255.0f green:113.0f/255.0f blue:255.0f/255.0f alpha:1.0f] range:NSMakeRange(0, 1)];
    
    
    [attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:51.0f/255.0f green:51.0f/255.0f blue:51.0f/255.0f alpha:1.0f] range:NSMakeRange(1, 2)];
    self.advance2View.stypeLab.attributedText = attributedString;
    
    [self.advance2View.frontBtn setImage:[UIImage imageNamed:@"renzheng_bg_card_face"] forState:(UIControlStateNormal)];
    [self.advance2View.reverseBtn setImage:[UIImage imageNamed:@" renzheng_bg_card_shouchi"] forState:(UIControlStateNormal)];
    
    self.advance2View.frontLab.text = @"上传信用卡正面";
    self.advance2View.reverseLab.text = @"上传本人手持信用卡正面";
    
}

-(void)createNextStype
{
    self.nextStypeBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.nextStypeBtn.backgroundColor = [UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.9 alpha:1];
    [self.nextStypeBtn setTitle:@"下一步" forState:(UIControlStateNormal)];
    [self.nextStypeBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
    self.nextStypeBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    self.nextStypeBtn.frame = CGRectMake(0, self.view.frame.size.height - ETTopHeight - ETTabBarArcHeight - 44, self.view.frame.size.width, 44);
    [self.view addSubview:self.nextStypeBtn];
    [self.nextStypeBtn addTarget:self action:@selector(nextStypeBtnAction) forControlEvents:(UIControlEventTouchUpInside)];
}
-(void)nextStypeBtnAction
{
    AdvancedIdentify4ViewController *advancedVC = [[AdvancedIdentify4ViewController alloc] init];
    [self.navigationController pushViewController:advancedVC animated:YES];
}



@end
